package com.taplinker.client.widget.image;


public class ImageOptions {
	public static final int MAX_IMG_WIDTH = 640;
	public static final int MAX_IMG_HEIGHT = 480;
	public static final int MAX_IMG_KB = 100;
	public static final int MIN_IMG_WIDTH = 200;
	public static final int MIN_IMG_HEIGHT = 180;
	public static final int MIN_IMG_KB = 10;
	public static final int DEFULT_QUALITY = 100;
	
	private boolean isMax = true;
	private int width = MAX_IMG_WIDTH;
	private int height = MAX_IMG_HEIGHT;
	private int maxKb = MAX_IMG_KB;
	private int quality = DEFULT_QUALITY;
	
	public ImageOptions() {
		super();
	}

	public ImageOptions(boolean isMax) {
		this();
		this.isMax = isMax;
		rest();
	}

	private void rest() {
		if(!isMax) {
			width = MIN_IMG_WIDTH;
			height = MIN_IMG_HEIGHT;
			maxKb = MIN_IMG_KB;
		}
	}

	public boolean isMax() {
		return isMax;
	}

	public void setMax(boolean isMax) {
		this.isMax = isMax;
		rest();
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getMaxKb() {
		return maxKb;
	}

	public void setMaxKb(int maxKb) {
		this.maxKb = maxKb;
	}

	public int getQuality() {
		return quality;
	}

	public void setQuality(int quality) {
		this.quality = quality;
	}
	
}
